<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" id="formAdd">
                <input type="hidden" id="roleId" name="roleId" value="${roleId}">
                <input type="hidden" id="menuId" name="menuId" value="${menuId}">
                <div id="permissionList"></div>
                <input type="hidden" lay-submit=""
                       <@shiro.hasPermission name="core/role/index:addRoleMenuPermission">
                        lay-filter="modifyData"
                       </@shiro.hasPermission>id="btnAdd"/>
            </form>
        </div>
    </div>
</div>
<script id="permission" type="text/html">
    <div class="layui-row layui-col-space10">
        {{# layui.each(d, function(index, item){ }}
        <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
            <input type="checkbox" class="layui-xtree-checkbox" name="permissionId" value="{{item.id}}|${menuUrl}:{{item.data}}" title="{{item.name}}({{item.data}})" lay-skin="primary"
                   {{item.checked?"checked":""}}>
        </div>
        {{# if ((1+index)%4 == "0") {}}
    </div>
    <div class="layui-row layui-col-space10">
        {{#}}}
        {{#  }); }}
    </div>
    {{#  if(d.length === 0){ }}
    无数据
    {{#  } }}
</script>
<script>
    var fn = {};
    layui.config ({
        base: '/static/' //静态资源所在路径
    }).extend ({
        index: 'lib/index' //主入口模块
    }).use (['index', 'core/role_menu_permission']);
</script>